<?php
	session_start();
		
	// 로그인 상태 확인
	if(!isset($_SESSION['usernm'])){
		header("Location: login.php");
	}
	
?>

<!DOCTYPE html>
<html lang="ko"> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<title>LifeQuest Main page</title> 
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=9" />

<link rel="stylesheet" href="css/bootstrap.css" type="text/css" />
<link rel="stylesheet" href="css/bootstrap-responsive.css" type="text/css" />
<link rel="stylesheet" href="css/style.css" type="text/css" />

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

<script src="js/bootstrap.js"></script>
<script src="js/lifequest.js"></script>

<!--[if lt IE 9]>
	<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>	
<![endif]-->

<script type="text/javascript">
	$(document).ready(function() {
		getQuests("<?php echo $_SESSION['userid'] ?>");
	});
</script>

</head>
<body>
	<div class="navbar ">
		<div class="navbar-inner">
			<div class="container">
				<a class="brand" href="./">Lifequest</a>
				<ul class="nav pull-right">
					<li class="dropdown">
						<a class="dropdown-toggle" data-toggle="dropdown">
							user : <?php echo $_SESSION['usernm'] ?>
							<b class="caret"></b>
						</a>
						<ul class="dropdown-menu">
							<li><a>user menu 1</a></li>
							<li><a>user menu 2</a></li>
						</ul>
					</li>
					<li>
						<a href="logout.php">Logout</a>		
					</li>
				</ul>
				
			</div>
		</div>    			
	</div>
	<div class="lq-container">	
		<div class="well" style="text-align:center;">
			<h1><a href="new.php">Register A New Quest!!</a></h1>
		</div>
		<div class="well ">
			<table class="table table-hover">
				<thead>
					<tr>
						<th>#</th>
						<th>quest name</th>
						<th>quest type</th>
						<th>quest start date</th>
						<th>quest exp date</th>
						<th>quest freq</th>
						<th>last checkin</th>
					</tr>
				</thead>
				<tbody id="tb_questlist">
					
					
				</tbody>
			</table>
		</div>
	</div>
	
</body>
</html>